package com.shiminghui;

import java.util.Random;
import java.util.Scanner;

public class SuiJiShu {
    public static void main(String[] args) {
        Random random = new Random();
        int a  = random.nextInt(100)+1;//1~100
        System.out.println(a);
        int count =5;
        Scanner scanner = new Scanner(System.in);
        while (count!=0){
            count--;
            int b = scanner.nextInt();
            if (b==a){
                System.out.println("正确");
                break;
            }else if(b<a){
                System.out.println("小了"+count);
            }else if(b>a){
                System.out.println("大了"+count);
            }

            if (count!=0){
                System.out.println("失败");
            }
        }

    }
}
